<?php

require_once __DIR__.'/../../src/autoload.php';

use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\DependencyInjection\Loader\LoaderInterface;

use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
use Symfony\Bundle\ZendBundle\ZendBundle;
use Symfony\Bundle\DoctrineBundle\DoctrineBundle;
use Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle;

use Bundle\TreeBundle\TreeBundle;
use Bundle\AclBundle\AclBundle;
use Bundle\ModuleBundle\ModuleBundle;
use Bundle\FireIceBundle\FireIceBundle;

use Application\Site1Bundle\Site1Bundle;

class Site1Kernel extends Kernel
{
    public function registerRootDir()
    {
        return __DIR__;
    }

    public function registerBundles()
    {
        $bundles = array(
            new FrameworkBundle(),

            // enable third-party bundles
            new ZendBundle(),
            new DoctrineBundle(),
            new SwiftmailerBundle(),
            new Symfony\Bundle\TwigBundle\TwigBundle(),

            // FI
            new FireIceBundle(),
            // register your bundles here
            new ModuleBundle(),
            new TreeBundle(),
            new AclBundle(),

            // Site
            new Site1Bundle(),
        );

        if ($this->isDebug()) {
        }

        return $bundles;
    }

    public function registerBundleDirs()
    {
        return array(
            'Application'        => __DIR__.'/../../src/Application',
            'Bundle'             => __DIR__.'/../../src/Bundle',
            'Symfony\\Framework' => __DIR__.'/../../src/vendor/Symfony/src/Symfony/Bundle',
        );
    }

    public function registerContainerConfiguration(LoaderInterface $loader)
    {
        $loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml');
    }
}